package com.ruibang.glass.material.entity.cp;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.material.entity.MaterialCpBcpItems;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 半成品入库详情
 * </p>
 *
 * @author mameng
 * @since 2024-04-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(description = "成品入库详情")
@TableName(value = "g_material_cp_products_in_info")
public class MaterialCPProductsInInfo extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "序号")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "入库单号")
    private String inStorageOrderNo;

    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;

    @ApiModelProperty(value = "类型")
    private String type;

    @ApiModelProperty(value = "状态")
    private String status;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "当前审批人")
    private String approvePerson;

    @ApiModelProperty(value = "入库单创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime inCreationTime;

    @ApiModelProperty(value = "入库完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime finishDate;

    @ApiModelProperty(value = "仓库主管")
    private String wareHousePerson;

    @ApiModelProperty(value = "制单人")
    private String preparer;

    @ApiModelProperty(value = "备注")
    private String remarks;


    @ApiModelProperty(value = "菜单Id")
    @TableField(exist = false)
    private String menuId;


    @ApiModelProperty(value = "制单人")
    private String preparerId;

    @ApiModelProperty(value = "状态")
    private String spStatus;


    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;


    @ApiModelProperty(value = "审批状态中文")
    @TableField(exist = false)
    private String spStatusCH;


    @ApiModelProperty(value = "物品Id")
    private String itemId;

    @ApiModelProperty(value = "物品名称")
    private String itemName;

    @ApiModelProperty(value = "物品编码")
    private String itemCode;

    @ApiModelProperty(value = "规格型号")
    private String specificationModel;

    @ApiModelProperty(value = "批次号")
    private String batchNumber;


    @ApiModelProperty(value = "LoT数量")
    private BigDecimal lotQuantity;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "Model等级")
    private String modelGrade;

    @ApiModelProperty(value = "A型架")
    private String aTypeShelf;

    @ApiModelProperty(value = "库位")
    private String storageLocation;

    @ApiModelProperty(value = "生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate productionDate;

    @ApiModelProperty(value = "保质期")
    private Integer shelfLife;

    @ApiModelProperty(value = "过期日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate expirationDate;

    @ApiModelProperty(value = "物品备注")
    private String itemRemarks;

    @ApiModelProperty(value = "产线")
    private String productLine;

    @ApiModelProperty(value = "id集合")
    @TableField(exist = false)
    private List<String> ids;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUser;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "数量")
    private BigDecimal quantity;

    @ApiModelProperty(value = "创建人")
    private String creator;

    @ApiModelProperty(value = "客户编号")
    private String customerNumber;

    @ApiModelProperty(value = "客户名称")
    private String customerName;

    @ApiModelProperty(value = "订单号")
    private String orderNumber;

    @ApiModelProperty(value = "保质期")
    private String useDate;

    @ApiModelProperty(value = "入库日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDate inventoryCreationTime;


    @ApiModelProperty(value = "入库状态")
    private String inStatus;

    @ApiModelProperty(value = "经手人")
    private String handler;

    @ApiModelProperty(value = "仓库区分")
    private String warehouseCode;

    @ApiModelProperty(value = "模块区分仓库")
    private String warehouseId;

    @ApiModelProperty(value = "退货Id")
    private String returnId;

    @ApiModelProperty(value = "容器Id")
    private String lotId;

    @ApiModelProperty(value = "成品半成品关联物品表")
    @TableField(exist = false)
    private List<MaterialCpBcpItems> materialCpBcpItemsList;


//    @ApiModelProperty(value = "仓管员")
//    private String warehouseUser;

//    @ApiModelProperty(value = "仓管员")
//    private String warehouseUserId;
}
